Adaptive Security Camera Image Compression Apparatus and Method of Operation

ABSTRACT

A lossy compression method optimizes bandwidth and storage for a security surveillance network. An appliance on a local network attached to event capture terminals transforms image files into a key frame and at least one subsequent frame. Decompression combines a subsequent frame with its key frame to provide an image with graduated resolution/noise clutter. A camera records, and forwards a plurality of image files compatible with JPEG. Key frames are selected from among the plurality of image files. A configurable low pass filter is reset for each train of a key frame and its subsequent frames. Each low pass filter is selectively applied to each pixel block within a subsequent frame. The transformation operates on coefficients of frequency bins. Meta data enables decompression of a single subsequent frame by reversing some of the transformations to provide a JPEG compatible file having selectively reduced resolution or noise clutter.

CROSS-REFERENCES TO RELATED APPLICATIONS

This non-provisional application claims the benefit of provisional application 61/949,526 and its priority date Mar. 7, 2014

STATEMENT REGARDING FEDERALLY SPONSORED RESEARCH OR DEVELOPMENT

Not Applicable

THE NAMES OF THE PARTIES TO A JOINT RESEARCH AGREEMENT

Not Applicable

INCORPORATION-BY-REFERENCE OF MATERIAL SUBMITTED ON A COMPACT DISK OR AS A TEXT FILE VIA THE OFFICE ELECTRONIC FILING SYSTEM (EFS-WEB)

Not Applicable

STATEMENT REGARDING PRIOR DISCLOSURES BY THE INVENTOR OR A JOINT INVENTOR

Not Applicable

BACKGROUND OF THE INVENTION Technical Field

As is known, digital cameras record, store, and transmit images in several industry standard formats, such as H.234 and JPEG. The field of the invention is in the field of image analysis, particularly image compression or coding applied to products of Huffman and DCT encoding.

JPEG

As is known, the name “JPEG” stands for Joint Photographic Experts Group, the name of the committee that created the JPEG standard and also other still picture coding standards.

The JPEG standard specifies the codec (code decode transform), which defines how an image is compressed into a stream of bytes and decompressed back into an image, but not the file format used to contain that stream.

JPEG uses a lossy form of compression based on the discrete cosine transform (DCT). This mathematical operation converts each frame/field of the video source from the spatial (2D) domain into the frequency domain (aka transform domain.) A perceptual model based loosely on the human psychovisual system discards high-frequency information, i.e. sharp transitions in intensity, and color hue. In the transform domain, the process of reducing information is called quantization. In simpler terms, quantization is a method for optimally reducing a large number scale (with different occurrences of each number) into a smaller one, and the transform-domain is a convenient representation of the image because the high-frequency coefficients, which contribute less to the over picture than other coefficients, are characteristically small-values with high compressibility. The quantized coefficients are then sequenced and losslessly packed into the output bitstream. Nearly all software implementations of JPEG permit user control over the compression-ratio (as well as other optional parameters), allowing the user to trade off picture-quality for smaller file size.

JPEG File Interchange Format (JFIF) is a minimal file format which enables JPEG bitstreams to be exchanged between a wide variety of platforms and applications. This minimal format does not include any of the advanced features found in the TIFF JPEG specification or any application specific file format. Nor should it, for the only purpose of this simplified format is to allow the exchange of JPEG compressed images.

JPEG Codec Example

Although a JPEG file can be encoded in various ways, most commonly it is done with JFIF encoding. The encoding process consists of several steps:

1. The representation of the colors in the image is converted from RGB to Y′CBCR, consisting of one luma component (Y′), representing brightness, and two chroma components, (CB and CR), representing color. This step is sometimes skipped. 2. The resolution of the chroma data is reduced, usually by a factor of 2. This reflects the fact that the eye is less sensitive to fine color details than to fine brightness details. 3. The image is split into blocks of 8×8 pixels, and for each block, each of the Y, CB, and CR data undergoes the Discrete Cosine Transform (DCT. A DCT is similar to a Fourier transform in the sense that it produces a kind of spatial frequency spectrum. 4. The amplitudes of the frequency components are quantized. Human vision is much more sensitive to small variations in color or brightness over large areas than to the strength of high-frequency brightness variations. Therefore, the magnitudes of the high-frequency components are stored with a lower accuracy than the low-frequency components. 5. The resulting data for all 8×8 blocks is further compressed with a lossless algorithm, a variant of Huffman encoding. 6. The decoding process reverses these steps, except the quantization because it is irreversible.

DCT

As is known, the discrete cosine transform (DCT) expresses a finite sequence of data points in terms of a sum of cosine functions oscillating at different frequencies. DCTs are important to numerous applications in science and engineering, from lossy compression of audio (e.g. MP3) and images (e.g. JPEG) (where small high-frequency components can be discarded), to spectral methods for the numerical solution of partial differential equations. The use of cosine rather than sine functions is critical in these applications: for compression, it turns out that cosine functions are much more efficient (fewer functions are needed to approximate a typical signal), whereas for differential equations the cosines express a particular choice of boundary conditions.

In particular, a DCT is a Fourier-related transform similar to the discrete Fourier transform (DFT), but using only real numbers. DCTs are equivalent to DFTs of roughly twice the length, operating on real data with even symmetry (since the Fourier transform of a real and even function is real and even), where in some variants the input and/or output data are shifted by half a sample. There are eight standard DCT variants, of which four are common.

The most common variant of discrete cosine transform is the type-II DCT, which is often called simply “the DCT”, its inverse, the type-III DCT, is correspondingly often called simply “the inverse DCT” or “the IDCT”.

The compression method is usually lossy, meaning that some original image information is lost and cannot be restored, possibly affecting image quality.

Like any Fourier-related transform, discrete cosine transforms (DCTs) express a function or a signal in terms of a sum of sinusoids with different frequencies and amplitudes. Like the discrete Fourier transform (DFT), a DCT operates on a function at a finite number of discrete data points. The obvious distinction between a DCT and a DFT is that the former uses only cosine functions, while the latter uses both cosines and sines (in the form of complex exponentials).

Huffman Encoding/Decoding

As is known, Huffman coding is an entropy encoding algorithm used for lossless data compression. The term refers to the use of a variable-length code table for encoding a source symbol (such as a character in a file) where the variable-length code table has been derived in a particular way based on the estimated probability of occurrence for each possible value of the source symbol.

Huffman coding uses a specific method for choosing the representation for each symbol, resulting in a prefix code that expresses the most common source symbols using shorter strings of bits than are used for less common source symbols. Huffman was able to design the most efficient compression method of this type: no other mapping of individual source symbols to unique strings of bits will produce a smaller average output size when the actual symbol frequencies agree with those used to create the code.

For a set of symbols with a uniform probability distribution and a number of members which is a power of two, Huffman coding is equivalent to simple binary block encoding, e.g., ASCII coding. Huffman coding is such a widespread method for creating prefix codes that the term “Huffman code” is widely used as a synonym for “prefix code” even when such a code is not produced by Huffman's algorithm.

Security Cameras

As is known, cameras used for security surveillance (SECCAMs) can produce high resolution and low resolution digital files. The files may be of static images or moving images. The cameras may auto focus and auto adjust for lighting. The cameras may store data or push it to network attached servers. Many SECCAMs do not pan or zoom and always present the same view. Some SECCAMs take a still image when triggered by a sensor, a timer, or an event.

One problem with conventional SECCAMs installed with onsite storage is that the data may be lost or stolen in the same incident for which the images would have been useful. SECCAMs may provide timestamps at the camera to record events for later viewing. In many cases, there is no attendant to monitor SECCAMs in real time. Thus economical remote storage and delayed analysis are advantageous if the useful images could be transported without congesting a low bandwidth network. A requirement is that allocated bandwidth schedules not be exceeded. Within this patent application we refer to JPEG compatible image files originating or derived from SECCAMs as “previews” or “frames”.

Thus it can be appreciated that what is needed is an improved system to bridge from cameras used for security surveillance to a network connected storage and analysis service center. Temporary storage of compressed images would allow bandwidth allocations to vary over time and day.

BRIEF DESCRIPTION OF DRAWINGS

To further clarify the above and other advantages and features of the present invention, a more particular description of the invention will be rendered by reference to specific embodiments thereof which are illustrated in the appended drawings. It is appreciated that these drawings depict only typical embodiments of the invention and are therefore not to be considered limiting of its scope. The invention will be described and explained with additional specificity and detail through the use of the accompanying drawings in which:

FIG. 1 is a block diagram of a conventional processor used for performing method steps in an apparatus; FIGS. 2-4 are flowcharts of steps in a method performed by a processor; and FIGS. 5-7 are block diagrams of an apparatus in a system.

SUMMARY OF THE INVENTION

A lossy compression method optimizes bandwidth and storage for a security surveillance network of appliances and event capture terminals. The method is performed by a processor upon an image file (Jframe) provided by a JPEG compatible encoder. The processor is adapted by computer readable instructions stored in non-transitory media to perform operations on Jframes in both the time domain and in the frequency domain simultaneously which cannot be done mentally or by hand. Because the objective is security surveillance, the viewpoint of an event capture terminal neither pans nor zooms.

A method transforms a sequential plurality of Jfhames into a train composed of a key frame (Kframe) and one or more subsequent frames (subframes). Each block of pixels in a key frame has coefficients in a plurality of frequency bins. Each corresponding block of pixels in a subsequent frame may contain the difference in coefficients between its source Jframe and its Kframe. One or more subsequent frames follow a key frame and are compressed relative to their untransformed Jframe by containing delta coefficients in the frequency domain. The resulting set of delta coefficients are re-encoded using a Huffman encoder.

Decompression combines a subsequent frame with its key frame to provide an image with graduated resolution/noise clutter. While viewing a subsequent frame on its own is possible with a JPEG compatible browser or display it would seem to be meaningless without its reference key frame. Reversing the transformation requires recovering all the frequency coefficients of the key frame and the subframe and adding each delta coefficient to its corresponding Kframe coefficient. But the invention further optimizes compression by removing thermal and visual noise and sacrificing resolution in some of the pixel blocks. The method further includes how to select pixel blocks and how to remove noise or sacrifice resolution.

A camera records, encodes, stores, and forwards a plurality of image files, each file compatible with JPEG standard encoders/decoders (codecs). In addition to motion video or high definition or 3D or analog signals, conventional cameras default to always providing a series of still images in digital format encoded by the JPEG standard. These are frequency domain coefficients for blocks of pixels further encoded by a Huffman codec. A local area network such as ethernet or wifi couples the camera with an appliance of the present disclosure.

Periodically or upon conditions in the content or external events, key frames are selected from among the plurality of image files. The apparatus may trigger on external events (e.g. sensors), image contents (e.g. motion, facial recognition), or internal processes such as periodicity (e.g. timer, counter), or data stored (e.g. buffer capacity) to select a Jframe as a key frame. The characteristics of one key frame may influence the selection of a next key frame. The size of a key frame may influence the target size of its subsequent frames and the configuration of a low pass filter.

A configurable low pass filter is reset for each train of key frame and subsequent frames. The method performed by the appliance uses the first subsequent frame following a key frame to configure a low pass filter. A target compressed file size is determined from the size of the key frame. An integer value is determined for the extent of a mask which removes coefficients of high frequency bins. Clipping selected frequencies reduces noise in the transformed (and shrunken) subframe by replacing certain frequency coefficients with zeros.

The configurable low pass filter (CLPF) is selectively applied to each pixel block within a subsequent frame. The masking of coefficients may occur for none of, some of, or all of the pixel blocks of a subsequent frame. Separate rules may override the masking of coefficients in each pixel block. As a result, a subsequent frame may contain pixel blocks which have various resolution levels.

Meta data is stored separately or within the file headers of key frames and subsequent frames to enable decompression of a single subsequent frame. Meta data includes but is not limited to identification of key frames and their locations (relative or absolute), the key frame each subsequent frame references, the size of files and the target size or target compression ratio, time and location, camera identity, and the low pass filter configuration.

Typically circuits of a first appliance locally attached to a network of event capture terminals transforms and stores a plurality of image frames into a key frame and at least one subsequent frame. The storage of transformed frames may be in locally attached storage or in a remote location referred to as the cloud. The result of each transformation is a JPEG compatible file but which may depend on decoding of a key frame to have visible content which is intelligible to a human viewer. If a Jframe following a first key frame fails to meet its required compression target, it is selected as a second key frame.

The transformation operates on coefficients of frequency bins. One aspect of the invention is to mask high frequency bins to achieve target size or compression ratios. Another aspect of the invention is to mask high frequency bins to remove thermal noise, lighting figments, and background vibration. Another aspect of the invention is to selectively improve resolution of selected pixel blocks for pertinent security surveillance objectives.

Circuits of a second appliance coupled to a remote or local store of transformed frames reverse some of the transformations to provide a JPEG compatible file having selectively reduced resolution or noise clutter. The compressed stream of Kframes and subframes may be stored locally and/or transmitted over a wide area network to one or more remote data centers for access by conventional cloud services. Decompression of a subframe utilizes meta data to select its Kframe to reverse the transformation of non-masked frequency coefficients and then Huffman re-encode. The result may be viewed in any JPEG compatible browser or display device. Advantageously, noise components of the original image have been selectively suppressed in storage, in transmission, and in display.

A first frame in a stream of JPEG image frames is designated a first key frame and stored. Each frame subsequent to the first key frame is transformed into a delta frame containing the differences from the first key frame. A second frame is designated a second key frame when the magnitudes of the differences cause the effective compression of the most recent transformed subsequent frame to fall below a threshold.

Data compression is obtained by only storing into non-transitory media and transmitting over a network the differences between a non-baseline frame and its baseline predecessor. Taking advantage of the nature of security cameras, there is high potential for successful compression. Many images taken are the same as the previous image. Even if an image has something new, most of the image is background or foreground, which has not changed. Security cameras are generally fixed and do not pan, zoom, or change in attitude. Lighting due to time of day will change and persons or vehicles will enter, leave, or transit from one edge to another.

A new baseline is selected when compression falls below a target. Typically, the first frame after a key frame has the least change and provides the best possible compression. The size of the difference files will range between the size of the first frame and that of the key frame. A parameter is set to determine a target minimum compression, which when exceeded causes a new key frame to be selected.

By applying Huffman decoding, we recover coefficients for a DCT transform of the image. These correspond to amplitudes for each frequency bin in a matrix of pixels. The amplitudes of a key frame are stored and the amplitudes of each subsequent image are subtracted from the corresponding coefficient. A small difference indicates little or no change.

A sequence of baseline frames and difference frames are transmitted from a local network and stored in compressed form in a wide area network attached cloud storage system which protects the security system from loss of data by media destruction or theft.

New key frames are selected either from a timer or counter or when the following compression steps do not provide substantial savings. The first compression is to compare a frame to its key frame and determine only the differences. If the differences indicate little change, even the resolution can be reduced by zeroing high frequency data for further compression. Even significant differences in high frequency data may be zeroed if analysis of low frequency or DC data indicates the source is static noise or vibration. Advantageously, an image may be a mix of higher and lower resolution blocks if analysis of low frequency or DC data indicates that a substantial change is occurring in that part of the image.

DETAILED DISCLOSURE OF EMBODIMENTS OF THE INVENTION

All of the following transformations and logic operations are performed by an electronic circuit. As is known, image file data may be read and stored to non-transitory computer readable media and operated on by a processor controlled by instructions in a store.

A lossy compression method optimizes bandwidth and storage for a security surveillance network of appliances and event capture terminals. Taking advantage of the nature of security cameras, there is high potential for successful compression. Many images taken are the same as the previous image. Even if an image has some new content, most of the image is background or foreground, which has not changed. Security cameras are generally fixed and do not pan, zoom, or change in attitude. Lighting due to time of day will change gradually and persons or vehicles will enter, progress from one edge to another, and exit the field of view.

An event capture terminal (such as a camera) records, encodes, stores, and forwards a plurality of image files, each file compatible with JPEG standard encoders/decoders.

A plurality of image frames are transformed into a train made of a key frame and one or more subsequent frames. By applying Huffman decoding, we recover coefficients for a DCT transform of the image. These correspond to amplitudes for each frequency bin in a matrix of pixels. The amplitudes of a key frame are stored and the amplitudes of each subsequent image are subtracted from the corresponding coefficient of a block in its key frame.

Periodically or upon conditions in the content or external events, key frames are selected from among the plurality of image files. New key frames may be selected on a number of triggers. One could by an external sensor, another from a timer or counter or file content such as when the following compression steps do not provide substantial savings. The first compression is to compare a frame to its key frame and utilize the differences in frequency coefficients. A further compression is available when the differences indicate little change, by zeroing high frequency data. Further masking of significant differences in high frequency data applies when analysis of low frequency or DC data indicates the source is static noise or vibration. Advantageously for bandwidth and storage conservation, a resulting transformed image may be a mix of higher and lower resolution blocks if analysis of low frequency or DC data indicates that a substantial change is localized to a portion of the full image.

A configurable low pass filter is reset for each train of key frame and subsequent frames. Typically, the first frame after a key frame has the least change and provides the best possible compression. The size of the difference files will range between the size of the first frame and that of the key frame. A parameter is set to determine a target minimum compression, which when exceeded causes a new key frame to be selected.

The low pass filter is selectively applied to each pixel block within a subsequent frame. If there is substantial amplitude in DC or low frequency bins, it suggests movement into or out of the field of view. If there is no significant difference in the DC or low frequency bins, the coefficients in the high frequencies can be discarded without loss of information because they are likely to show only static, or noise, or vibration. Pixel blocks with DC and low frequency activity cause retention of the high frequency coefficients to provide a higher resolution image. An unchanging background can be lower resolution without affecting the security value. So a transformed frame may usefully have a mix of higher resolution pixel blocks and lower resolution pixel blocks. As is known, DC originally refers to direct current and distinguishes a signal value from AC or alternating current. By extension, in the frequency domain it refers to the lowest range of frequencies in a spectrum.

One detailed aspect of the invention is a method for compression of a plurality of JPEG codec compatible files (Jframe) in time, spatial, and frequency domains which has the steps: reversing Huffman encoding of a first Jframe and storing every frequency coefficient of every block of pixels in to a computer-readable store as a first key frame (Kframe); reversing Huffman encoding of an other Jframe to obtain every frequency coefficient of every block of pixels; transforming the other Jframe into a subsequent frame (subframe) by determining delta frequency coefficients for each block of pixels in the subframe; storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; when the resulting file size meets the target compression goal, storing the file as a subsequent file and storing meta data relating the subsequent file to its related key file, and when the resulting file size exceeds the target compression goal, discarding the delta coefficients and storing the original frequency coefficients of all the blocks as a new key file.

A delta coefficient is the difference between a frequency coefficient of a block of pixels of a Jframe and the corresponding frequency coefficient in its preceding Kframe.

This method performs compression in time by comparing a frame taken at one point in time with a reference frame from an earlier point in time. It also compresses spatially by operating on blocks of pixel in one frame with the corresponding blocks of pixels in the reference frame. And the compression also operates in the frequency domain by subtracting each DCT frequency coefficient from its equivalent.

Another process embodiment is a method for compression of a plurality of JPEG codec compatible files (Jframe) in time, spatial, and frequency domains which includes additional steps: reversing Huffman encoding of a first Jframe and storing every frequency coefficient of every block of pixels in to a computer-readable store as a first key frame (Kframe); reversing Huffman encoding of an other Jframe to obtain every frequency coefficient of every block of pixels; transforming the other Jframe into a subsequent frame (subframe) by determining delta frequency coefficients for each block of pixels in the subframe; applying a motion trigger rule to the delta frequency coefficients of each block of pixels separately; on determining a condition that the motion trigger rule passes for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the motion trigger rule fails for each block of pixels, storing zeros for all the delta frequency coefficients of each block; when the resulting file size meets the target compression goal, storing the file as a subsequent file and storing meta data relating the subsequent file to its related key file, and when the resulting file size exceeds the target compression goal, discarding the delta coefficients and storing the original frequency coefficients of all the blocks as a new key frame.

A motion trigger rule may involve the DC or the lowest frequency range of bins for a block of pixels. Above a threshold, a change from the reference coefficients of the key frame may activate a motion trigger rule.

In an embodiment, the method performed by a processor coupled to non-transitory computer readable storage further includes: applying a noise trigger rule to the delta frequency coefficients of each block of pixel separately; on determining a condition that the noise trigger rule fails for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the noise trigger rule passes for each block of pixels, applying a High Frequency Coefficient (HFC) mask which zeros the H highest frequency delta coefficients of each block, and Huffman encoding the HFC masked delta frequency coefficients; and, determining a file size of a file which contains all the Huffman encoded delta frequency coefficients which have been HFC masked or not masked.

A noise trigger rule may compare high frequency components to low frequency components with a block of pixels. When delta low frequency components are substantially the same or below a threshold, while delta high frequency components are above a threshold, it may activate a noise trigger rule.

In another embodiment, the method further includes: applying a least significant bit (LSB) trigger rule to the delta frequency coefficients of each block of pixel separately; on determining a condition that the LSB trigger rule fails for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the LSB trigger rule passes for each block of pixels, applying an LSB mask which zeros the L least significant bits of the delta coefficients of each block, and Huffman encoding the LSB masked delta frequency coefficients; and, determining a file size of a file which contains all the Huffman encoded delta frequency coefficients which have been LSB masked or not masked.

Within each frequency bin the least significant bits may not be perceptible to a human observer. A LSB trigger rule may be tailored for an application or a venue or time of day or the type of display or analysis. A facial recognition backend may require more bits than a human operator can use. The rule may set L the number of bits masked off.

In an embodiment, the method also includes: configuring a low pass filter; applying a configured low pass filter trigger (CLPF) rule to the delta frequency coefficients of each block of pixels separately; on determining a condition that the CLPF trigger rule fails for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the CLPF trigger rule passes for each block of pixels, applying the configured low pass filter to the delta frequency coefficients of each block, and Huffman encoding the filtered delta frequency coefficients; and, determining a file size of a file which contains all the Huffman encoded delta frequency coefficients which have been filtered or not filtered.

A configured low pass filter rule may be triggered by motion, or noise, or contents of the file, or by external events such as sensors, e.g. sound, vibration, temperature. Once configured, the CLPF may be applied on a block by block basis according to its trigger rule.

In an embodiment, configuring a low pass filter includes the steps: reading a target compression ratio from a non-transitory computer readable store; determining a target compressed file size by applying the target compression ratio to a first key frame; determining a number P of highest frequency bins of delta frequency coefficients which when zeroed, cause a first subsequent frame to meet the target compressed file size; and storing P as the configuration of a low pass filter until a new key frame is selected.

In certain circumstances more than one trigger rule may be activated and more than one compression method may be applied to a frame or even to a block of pixels within a frame.

Another aspect of the invention is in the embodiment of circuits of a first appliance locally attached to a network of event capture terminals transforms and stores a plurality of image frames into a key frame and at least one subsequent frame. Meta data is stored separately or within the file headers of key frames and subsequent frames to enable decompression of a single subsequent frame.

A reception archival presentation method includes, receiving and storing a key frame; receiving and storing at least one difference frame; receiving a user command to display said difference frame; reading the key frame from storage; decoding the coefficients of the key frame by Huffman decoding; reading the difference frame; decoding the coefficients of the difference frame by Huffman decoding; adding the coefficients of the key frame to the coefficients of the difference frame; restoring a JPEG compatible file by Huffman encoding the sums of the coefficients; and transmitting the restored JPEG compatible file to a user workstation, whereby the user may display the restored JPEG compatible file in a browser.

Referring now to the figures, a method embodiment is illustrated in FIG. 2 to assist in apprehension of the subject matter. A method embodiment which is performed by a processor controlled by computer executable instructions stored in non-transitory media includes:

-   -   Receiving a Key Frame (Kframe), storing size, determining target         size for subsequent frames, and recovering baseline frequency         bin coefficients for every pixel block by reversing Huffman         encoding of a JPEG codec compatible image file (Jframe); 201     -   Several methods are disclosed infra to test a Jframe for         selection as a Key Frame. Once selected, its frequency         coefficients are used to determine delta coefficients for         subsequent frames.     -   Receiving 1st Jframe following Kframe 310; while unlikely due to         the nature of security surveillance systems, the method includes         determining not another Kframe 312;     -   Determining delta coefficients for every frequency bin of every         block of Jframe by reversing Huffman encoding and subtracting         each frequency bin coefficient from its Kframe correspondent;         314     -   Configuring Low Pass Filter Mask to achieve target size for 1st         subsequent frame 315 by setting an integer to denote the number         of high frequency bins that are masked out up to a fixed minimum         Low Pass Filter bandwidth (minLPF limit);     -   Huffman encoding delta coefficients to generate 1st Subsequent         Frame (subFrame); 319     -   For each additional Jframe after the 1st subFrame until a next         Kframe is selected 400:     -   Reversing Huffman encoding to recover frequency bin coefficients         for every block; 420     -   Determining delta coefficients for every frequency bin of every         pixel block of frame 430 by reversing Huffman encoding and         subtracting each frequency bin coefficient from its         correspondent in the Kframe.     -   For each pixel block of the Jframe 500, one of the following         steps:     -   Case I: When delta DC coefficient is greater or equal to a DC         threshold, enabling all delta coefficients in the block; 540     -   Case II: When delta DC coefficient is less than the DC         threshold, and     -   a sum of a group of high AC delta coefficients exceeds an AC         threshold,     -   enabling only LPF unmasked delta coefficients in the block; 550     -   Case III: When delta DC coefficient is less than the DC         threshold, and     -   a sum of a group of high AC delta coefficients is less than or         equal to the AC threshold,     -   forcing all delta coefficients in the block to zero; 560     -   When all pixel blocks of the Jframe have been transformed,         Huffman encoding all the blocks to generate a next Subsequent         Frame; 670 which returns the process to step 400;     -   Applying qualification test for selection as a Key Frame 780         which would return the process to step 201; and     -   Storing meta data relating each Subsequent Frame (SubFrames) to         a Key Frame in the file headers or in a separate table 890.

It can be appreciated that the sequential exposition of the method steps is presented for clarity and not as a limitation precluding embodiment processes that may be efficiently performed in parallel or different order by circuits or processor threads.

Various methods can be employed to select a Key Frame from among a plurality of JPEG codec compatible image files. In an embodiment, a maximum period in time or in number of frames can be set as a parameter. When that maximum is met, an image is selected as a new key frame. All the frames following will be compared to the key frame until a new key frame is selected.

Exemplary Embodiments of the Claimed Subject Matter:

One aspect of the invention is an exemplary apparatus having a circuit to receive JPEG codec compatible files and reverse Huffman encoding to obtain frequency coefficients for each pixel block; a circuit to distinguish key frames from subsequent frames; a circuit to set a configurable low pass filter for each train of a key frame and its subsequent frame or frames; a circuit to determine delta coefficients for each frequency bin of each pixel block; a circuit to selectively zero insignificant delta coefficients; and a circuit to apply the configurable low pass filter to selected pixel blocks.

In an embodiment, the apparatus also has a circuit to Huffman encode delta coefficients into a JPEG codec compatible file and store meta data to relate a subsequent frame to its key frame. In an embodiment, the circuit to apply the configurable low pass filter is controlled by the magnitude of the delta coefficients in certain low frequency bins. In an embodiment, the circuit to set a configurable low pass filter determines the minimum number of high frequency coefficients to mask out to achieve a target compression size.

Another aspect of the invention is an exemplary method for transforming JPEG codec compatible files by a processor communicatively coupled to at least one event capture terminal and coupled to a non-transitory computer-executable instruction store, the method comprising: reading a first target compression ratio store; receiving a first JPEG codec compatible image file; determining a post-compression target file size; receiving a second JPEG codec compatible image file (Jframe); decoding frequency bin coefficients for each pixel block of the first Jframe and of the second Jframe by reverse Huffman encoding; determining an integer value to configure a low pass filter mask; determining a difference between each pair of respective coefficients of a pixel block in the first Jframe and its corresponding pixel block in the second Jframe; determining when the difference between each pair of respective coefficients of the low pass filter masked frequency bins is less than a threshold; and on the condition that the differences for all masked bits are below the threshold; forcing the difference values of masked frequency bins to zero.

In an embodiment the process of determining an integer value to configure a low pass filter mask comprises: reading an integer value for a fixed minimum Low Pass Filter (minLPF) mask representing a limit to a number of high frequency bins which may be set to zero, reading the post-compression target file size; determining the smallest integer value integer which successfully achieves the post-compression target file size; and storing the lesser of minLPF or the smallest integer value which successfully achieves the post-compression target file size as the integer value to configure a low pass filter mask.

In an embodiment the method also includes determining that a 1st JPEG codec compatible image file (Jframe) is a key frame by one of periodically or upon conditions in the content or external events, selecting a Jframe from among the plurality of image files by an external event, image content, periodicity in time or count, or quantity of data stored.

In an embodiment the method also includes storing metadata to identify the relationship and location of key frames and subsequent frames.

In an embodiment the method also includes writing meta data into file headers for Kframes and subframes to identify their relationship.

In an embodiment the method also includes Huffman encoding the difference values of all pixel blocks of the second Jframe to provide a JPEG compatible subsequent frame file.

Another aspect of the invention is an exemplary method for transforming JPEG codec compatible files by a processor communicatively coupled to at least one event capture terminal and coupled to a non-transitory computer-executable instruction store, the method includes the steps: reading a first target compression ratio store; receiving a first JPEG codec compatible image file; determining a post-compression target file size; receiving a second JPEG codec compatible image file (Jframe); decoding frequency bin coefficients for each pixel block of the first Jframe and of the second Jframe by reverse Huffman encoding; selecting the first Jframe as a key frame (Kframe) and the second Jframe as a subsequent frame (subframe); differencing coefficients of a key frame and a subsequent frame; re-encoding the difference in coefficients as a JPEG compatible subsequent frame; determining when the resultant subsequent frame meets the required target size; and on the condition that the resultant subsequent frame meets the required target size, storing the file and annotating the meta data with the relationship of the subsequent file to the key file; or on the condition that the resultant subsequent frame fails to meet the required target size, discarding it and designating the second Jframe as a second key frame.

In an embodiment, the method also includes determining the absolute magnitude of the difference between the coefficients of certain low frequency bins of the key frame and the subsequent frame; summing the absolute magnitude of the differences between the coefficients of certain low frequency bins; on the condition when the sum of the absolute magnitude of the coefficients of certain low frequency bins exceeds a threshold, enabling all of the differences between coefficients in all of the frequency bins to be available for re-encoding into a JPEG compatible file.

In an embodiment the method also includes determining the absolute magnitude of the difference between the coefficients of certain low frequency bins of the key frame and the subsequent frame; summing the absolute magnitude of the differences between the coefficients of certain low frequency bins; on the condition when the sum of the absolute magnitude of the coefficients of certain low frequency bins is below a threshold, enabling only the coefficients of the low pass filter mask frequency bins for re-encoding into a JPEG compatible file.

In an embodiment the method also includes reading an integer value for a fixed minimum Low Pass Filter (minLPF) mask representing a limit to a number of high frequency bins which may be set to zero; reading the post-compression target file size; determining the smallest integer value integer which successfully achieves the post-compression target file size; storing the lesser of minLPF or the smallest integer value which successfully achieves the post-compression target file size as the integer value to configure a low pass filter mask; and designating the non-masked bits of the low pass filter as indicators of certain low frequency bins.

In a useful application which illustrates the benefits and the principles of the subject of the application a local area network couples security cameras to a compression apparatus. It is desirable that the long-term image storage be offsite to protect against theft or destruction. Lower resolution image files in JPEG compatible file formats are pushed across a public wide area network to a cloud storage service. To avoid congestion, a maximum bit rate is allocated to the security service at all times. The apparatus adaptively applies a set of compression rules and methods to meet the allocated budget for image transmission.

A currently preferred exemplary embodiment follows:

One aspect of the present invention performs, by a processor, delta compression of jpeg preview images. A key frame is stored in non-transitory media, and a subsequent frame is encoded as deltas from that key frame. The amount of compression being achieved is tracked, and when it starts decreasing a new key frame is generated. The delta frames are also encoded as jpeg compatible files, so they also benefit from the JPEG codec's compression/encoding gains. Thus, if one displays a raw delta frame, it appears as an all grey preview because each block of frequency coefficients are difference values between coefficients of a key frame and coefficients of a subsequent image frame. For static scenes, the embodiment has achieved about 4× compression. All of this is “unwound” within the archiver, so has no impact on external APIs.

All the difference transformations are done in frequency space, which means it only requires Huffman encoding/decoding of JPEG files which is very fast. In addition, when motion detection is performed in DCT space, decoding all previews to this level can be done only once.

Another aspect of the invention is a method for supporting transfer of security camera images through a limited bandwidth channel to remote storage services comprising: receiving from a camera an image file encoded by a JPEG compatible codec; reversing Huffman encoding to reconstitute a plurality of frequency coefficients for 8×8 blocks of pixels; subtracting each coefficient from a corresponding coefficient stored for a predecessor key frame to determine difference results; when the difference results are small relative to a threshold, setting high frequency coefficients to zero; Huffman encoding the difference coefficients; and transmitting the encoded difference coefficients as a difference file.

In an embodiment, the method further comprises when the difference results are high relative to a threshold; determining the image file is a new key file; storing the coefficients; and transmitting the image file to remote storage services as a new key file.

In an embodiment, the method further comprises when the difference results for low frequency coefficients is small and the difference results for high frequency coefficients are high, determining the pattern corresponds to static noise or vibration and setting the high frequency difference results to zero; when the difference results for low frequency coefficients is large and the difference for high frequency coefficients are high, determining the pattern corresponds to movement and storing the high frequency differences as computed.

In an embodiment, the method further comprises reading from non-transitory media a minimum threshold of compression parameter; determining a ratio of compression for each Huffman encoded difference file to its key file; and on the condition that the ratio passes the minimum threshold, transmitting the difference file to remote storage, or on the condition that the ratio fails the minimum threshold, transmitting the image file to remote storage and storing its coefficients as a new key file.

One aspect of the invention is a method for supporting transfer of security camera images through a limited bandwidth channel to remote storage services comprising: receiving from a camera an image file encoded by a JPEG compatible codec; reversing Huffman encoding to reconstitute a plurality of frequency coefficients for 8×8 blocks of pixels; subtracting each coefficient from a corresponding coefficient stored for a predecessor key frame to determine difference results; when the difference results are small relative to a threshold, setting high frequency coefficients to zero; Huffman encoding the difference coefficients; and transmitting the encoded difference coefficients as a difference file.

In an embodiment, the method further comprises when the difference results are high relative to a threshold; determining the image file is a new key file; storing the coefficients; and transmitting the image file to remote storage services as a new key file.

In an embodiment, the method further comprises when the difference results for low frequency coefficients is small and the difference results for high frequency coefficients are high, determining the pattern corresponds to static noise or vibration and setting the high frequency difference results to zero; when the difference results for low frequency coefficients is large and the difference for high frequency coefficients are high, determining the pattern corresponds to movement and storing the high frequency differences as computed.

In an embodiment, the method further comprises reading from non-transitory media a minimum threshold of compression parameter; determining a ratio of compression for each Huffman encoded difference file to its key file; and on the condition that the ratio passes the minimum threshold, transmitting the difference file to remote storage, or on the condition that the ratio fails the minimum threshold, transmitting the image file to remote storage and storing its coefficients as a new key file.

Reference will now be made to the drawings to describe various aspects of exemplary embodiments of the invention. It should be understood that the drawings are diagrammatic and schematic representations of such exemplary embodiments and, accordingly, are not limiting of the scope of the present invention, nor are the drawings necessarily drawn to scale.

Referring now to FIG. 3, another embodiment of the present invention is a method performed by a computer processor when executing instructions stored in non-transitory computer readable media, the method for determining a compressed Jframe 200. By Jframe we mean an image file recorded by a security surveillance camera and stored as a JPEG codec compatible file. The method includes reading a stored minimum compression threshold parameter 301; receiving an image frame from a security camera 310; Huffman decoding each frequency coefficient 330 for each block of pixels in the image; determining a difference from a key frame for each frequency coefficient 340 for every block; determining a subframe by Huffman encoding the difference in frequency coefficients and computing total size 350; when a frame counter identifies the Kth subframe following the previous Key frame, determining compression 360; when the Kth subframe meets the minimum compression threshold, storing the size as a target 370; and when the subframe exceeds the minimum compression threshold, select a new key frame 390.

Referring now to FIG. 4, an aspect of the invention is a method by a processor applying a test for selection as Key Frame 780. The method includes decrementing a Jframe counter or timer from the last key frame which counts down to zero 410; receiving an image Jframe from a security camera 420; Huffman decoding each frequency coefficient 313 of a block in the image Jframe; determining a difference from previous key frame for each frequency coefficient 314; Huffman encoding the differences in frequency coefficients 319; determining a storage size for the compressed Jframe 460; when the compressed storage size exceeds a target size, storing the received image Jframe as a new key frame 470; storing all the frequency coefficients of the new key frame and the size of the new key frame 480; and resetting Jframe counters to K+1 and timers to T+1 490.

Referring now to FIG. 5, an apparatus embodiment 500 of the present invention includes an image frame receiver 701 which receives JPEG compatible files from a plurality of network attached security surveillance cameras (not shown). The image frame receiver is coupled to a subsequent frame store 710. The subsequent frame store is coupled to a Huffman decoder 720 which reverses part of the JPEG encoding process to yield coefficients for each block of pixels. The coefficients which correspond to amplitudes of a DCT transformation are stored into the attached subsequent coefficient store 730. A key frame has previously been selected, decoded, and stored. Its respective coefficients are read from a key coefficient store 740. Both stores are coupled to a coefficient differencer circuit 750 which subtracts the coefficients of the subsequent frame from the coefficients of the key frame. The coefficient differencer 750 is coupled to a low pass filter circuit 760 which zeros the amplitudes of selected high frequency terms. That is, the high frequency components of a subsequent frame are discarded. The remaining coefficients are Huffman encoded to create a JPEG compatible file but which only has the differences of certain coefficients between the key frame and the subsequent frame. A key switch trigger 975 may determine that the degree of compression is satisfactory. The Huffman encoded difference file is stored into a transmit buffer 779 for eventual uploading through a wide area network to a storage service.

Referring now to FIG. 6, an apparatus embodiment 600 of the present invention also includes a DC level trigger circuit 855 which is coupled to the output of the coefficient differencer 750, and to the input of the low pass filter 760. In an embodiment the DC level trigger is also coupled to the Huffman encoder 770 (not shown). Depending on various stored parameters, also not shown, the DC level trigger enables or disables the low pass filter 760 to zero selected high frequency components. That is, the DC level trigger enables noise filtering on the condition that the DC or low frequency components of the image are not substantially different from the key frame. When they are substantially different, a higher resolution block of pixels is passed to the Huffman encoder 770. Beneficially, those blocks of the image which are substantially unchanging will have noise reduction and those blocks with significant change will have higher quality of resolution. Illustrated in FIG. 6 is the scenario in which the increased data of some blocks has not grown to a level which causes the key switch trigger 975 to activate so the resulting mixed resolution image is stored into the transmit buffer 779.

Referring now to FIG. 7, an apparatus embodiment 700 of the present invention also includes a key image switch circuit 776 which is coupled to the subsequent frame store 710 and a key frame store 916, and is coupled to the subsequent coefficient store 730 and the key coefficient store 740. The key image switch 776 is controlled by a key switch trigger circuit 975 which is coupled to the Huffman encoder 770. The key frame store 916 is further coupled to a transmit buffer 779. A new key frame may be selected for a number of reasons: there may be a counter or timer to establish a maximum period for transmitting a key frame from which all subsequent frames are differenced. But a beneficial aspect of the present invention is to adaptively select key frames to perform compression on a series of JPEG compatible image frames. In the example shown, the DC level trigger 855 determines that one or more blocks of the image have substantially changed and disables the low pass filter 760 from zeroing high frequency coefficients. After the encoding of the difference frame in the Huffman encoder 770, the size of the result and the degree of compression attained is compared with a target size by the key switch trigger 975. When the key switch trigger determines that the compression is no longer sufficiently advantageous (according to stored parameters not shown), the key image switch selects the current subsequent frame as a new key frame by transferring the subsequent frame from the subsequent frame store 710 into the key frame store 916 and also to the transmit buffer 779. The contents of the subsequent coefficient store 730 are also transferred to the key coefficient store 740. Embodiments of the circuits may also read out the subsequent frame store 710 directly to a transmit buffer 779 as the following subsequent frame is read in. Circuit functionalities herein disclosed may be combined into more complex circuits or parallel processor instructions without changing the claimed invention.

An apparatus receives image frames from security video cameras. If the images are already encoded using a JPEG compatible codec, they are transformed by Huffman decoding to produce a plurality of blocks having amplitudes as frequency coefficients.

Compression is controlled by a set of parameters which includes selection of key frames.

A change exceeding a threshold in lower-frequency amplitudes, determined by a set of parameters, controls noise filtering. Changes in higher frequency coefficients are not encoded when the size of images exceeds a target.

After high-frequency amplitudes have been clipped to remove noise from selected blocks, the remaining frequency amplitudes of the subsequent frame is compared with a key frame and a delta frame is determined. The amount of compression achieved by the delta is computed and tracked. Each delta is transformed by Huffman encoding and stored as a JPEG unless the amount of compression is decreasing. On that condition, a new key frame is selected.

A currently preferred exemplary embodiment follows:

One aspect of the present invention performs, by a processor, delta compression of jpeg preview images. A key frame is stored in non-transitory media, and a subsequent frame is encoded as deltas from that key frame. The amount of compression being achieved is tracked, and when it starts decreasing a new key frame is generated. The delta frames are also encoded as jpeg compatible files, so they also benefit from the JPEG codec's compression/encoding gains. Thus, if one displays a raw delta frame, it appears as an all grey preview because each block of frequency coefficients are difference values between coefficients of a key frame and coefficients of a subsequent image frame. For static scenes, the embodiment has achieved about 4× compression. All of this is “unwound” within the archiver, so has no impact on external APIs.

All the difference transformations are done in frequency space, which advantageously requires only Huffman encoding/decoding of JPEG files which is very fast. In addition, when motion detection is performed in DCT space, decoding all previews to this level can be done only once.

JPEG files are encoded in a “spatial frequency” dimension. At night, cameras normally move to very high gain settings, which creates “speckle” noise—each pixel has small relatively random noise added to it. This creates a lot of high frequency noise and cause JPEG (and any other video compression scheme) to produce much larger images. In the present invention, the method arbitrarily “clips” this data, not encoding changes in the higher frequencies when it determines the size starting to grow out of control.

While this clipping it normally invisible, where motion is actually occurring the clipping can significantly degrade the utility of the resulting image. To avoid this, if a JPEG block has significant change in the lower frequency coefficients the clipping is prevented. Contrary to privacy considerations, it is the home intruder who is kept in highest definition while the pixel blocks of static room occupants are compressed into lower resolution.

Aspects of the invention follow:

A system provides a cloud based archival and presentation apparatus communicatively coupled by a unreliable low bandwidth wide area network to a transmission apparatus locally networked to a plurality of conventional security video capture devices. The transmission apparatus receives a sequence of images, determines motion, removes noise, selects key frames, compresses interstitial frames, and transmits compressed jpeg previews to the archival and presentation apparatus.

One aspect of the invention is a method for operation of a system performed at processors executing computer-instructions encoded in non-transitory media on data stored in electronic circuits by: at a transmission apparatus coupled to a plurality of security video capture devices, receiving image files split into blocks of 8×8 pixels, transformed by a Discrete Cosine Transform (DCT) into frequency bins. A DCT is similar to a Fourier transform in the sense that it produces a kind of spatial frequency spectrum; decompressing the data by transforming the image file components by applying a variant of Huffman encoding; reading the amplitudes of the frequency components which include high-frequency components, mid-frequency components, and low-frequency components; determining motion; reading stored parameters which control noise suppression; suppressing noise components when determining motion is not true; reading stored parameters which control selection of key frames; selecting a first key frame; comparing a plurality of subsequent frames to the first key frame; determining a delta frame between each subsequent frame and a first key frame; determining an amount of compression which each delta frame has over the first key frame, while the amount of compression is not decreasing for each subsequent frame, encoding and storing the delta frame with JPEG transformation; while the amount of compression is decreasing, discarding the delta frame and selecting a second key frame; and transmitting key frames and delta frames to an archival apparatus.

A transmission method comprising, receiving a bandwidth and schedule budget; receiving a plurality of JPEG compatible image files from a security surveillance camera; determining a key frame and a difference frame; storing the key frame; compressing and storing said difference files in non-transitory media; determining the schedule enables transmission; and transmitting the key frame and the difference frame to a storage server over a wide area network.

CONCLUSION

An apparatus adaptively compresses image files to fulfill a storage or bandwidth budget. Portions of a JPEG codec compatible file are compressed by suppressing noise or by selectively sacrificing resolution. An image frame is selected to serve as a baseline or reference. Compression may be obtained by operations in the frequency domain by comparing the magnitude of frequency coefficients and by selective application of a low pass filter.

The present invention may be easily distinguished from conventional video compression or file compression methods and apparatus by selectively applying a configurable low pass filter to pixel blocks.

The configurable low pass filter is adapted by operating on a key frame and its first subsequent frame to determine a mask for certain high frequency bin coefficients toward achieving a target compression ratio or size.

The present invention can be easily distinguished from H.264 which is block-oriented motion-compensation-based video compression standard developed by the ITU-T Video Coding Experts Group (VCEG) together with the ISO/IEC JTC1 Moving Picture Experts Group (MPEG). As is known, H.264 encoding and decoding requires significant computing power in specific types of arithmetic operations. While security camera themselves may themselves contain H.264 encoders, it is much more difficult to decode, adaptively compress, and reencode H.264 to meet a bit rate quota. Pushing H.264 files into a channel would disadvantageously swamp a wide area network.

The present invention can be easily distinguished by being dynamically self-adjusting to meet a substantially lower target bit rate. The present invention can be easily distinguished from conventional compression by providing different resolution to portions of the same image.

The present invention can be easily distinguished from conventional interframe compression by its operation in the frequency domain. Deltas are determined from a key frame and a subsequent frames. While the amount of compression is the same or increasing, the delta are encoded and stored. When the amount of compression decreases below a threshold, a new key frame is selected. The present invention is distinguished by using low-frequency coefficients of each block of pixels to determine when to control noise introduced by high gain settings. The present invention is distinguished by selecting key frames as a function of decreasing compression.

The techniques described herein can be implemented in digital electronic circuitry, or in computer hardware, firmware, software, or in combinations of them. The techniques can be implemented as a computer program product, i.e., a computer program tangibly embodied in an information carrier, e.g., in a machine-readable storage device or in a propagated signal, for execution by, or to control the operation of, data processing apparatus, e.g., a programmable processor, a computer, or multiple computers. A computer program can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program can be deployed to be executed on one computer or on multiple computers at one site or distributed across multiple sites and interconnected by a communication network.

Method steps of the techniques described herein can be performed by one or more programmable processors executing a computer program to perform functions of the invention by operating on input data and generating output. Method steps can also be performed by, and apparatus of the invention can be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application-specific integrated circuit). Modules can refer to portions of the computer program and/or the processor/special circuitry that implements that functionality.

Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read-only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto-optical disks, or optical disks. Information carriers suitable for embodying computer program instructions and data include all forms of non-volatile memory, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in special purpose logic circuitry.

FIG. 1 is a block diagram of an exemplary processor that may be used to perform one or more of the functions described herein. Referring to FIG. 1, processor 100 may comprise an exemplary client or server process. Processor 100 comprises a communication mechanism or bus 111 for communicating information, and a processor core 112 coupled with bus 111 for processing information. Processor core 112 comprises at least one processor core, but is not limited to a processor core, such as for example, ARM™, Pentium™, etc.

Processor 100 further comprises a random access memory (RAM), or other dynamic storage device 104 (referred to as main memory) coupled to bus 111 for storing information and instructions to be executed by processor 112. Main memory 104 also may be used for storing temporary variables or other intermediate information during execution of instructions by processor core 112.

Processor 100 also comprises a read only memory (ROM) and/or other static storage device 106 coupled to bus 111 for storing static information and instructions for processor core 112, and a non-transitory data storage device 107, such as a magnetic storage device or flash memory and its associated control circuits. Data storage device 107 is coupled to bus 111 for storing information and instructions.

Processor 100 may further be coupled to a display device 121 such a flat panel display, coupled to bus 111 for displaying information to a computer user. Voice recognition, optical sensor, motion sensor, microphone, keyboard, touch screen input, and pointing devices 123 may be attached to bus 111 or a wireless network interface 125 for communicating selections and command and data input to processor core 112.

A number of embodiments of the invention have been described. Nevertheless, it will be understood that various modifications may be made without departing from the spirit and scope of the invention. For example, other network topologies may be used. Accordingly, other embodiments are within the scope of the following claims. 

I claim:
 1. An apparatus for conservation of bandwidth and storage in a security surveillance system comprising: a circuit to receive JPEG codec compatible files and to reverse Huffman encoding to obtain frequency coefficients for each pixel block; a circuit to distinguish key frames from subsequent frames; a circuit to set a configurable low pass filter for each train of a key frame and its subsequent frame or frames; a circuit to determine delta coefficients for each frequency bin of each pixel block; a circuit to selectively zero insignificant delta coefficients; and a circuit to apply the configurable low pass filter to selected pixel blocks.
 2. The apparatus of claim 1 further comprising: a circuit to Huffman encode delta coefficients into a JPEG codec compatible file and store meta data to relate a subsequent frame to its key frame.
 3. The apparatus of claim 1 wherein the circuit to apply the configurable low pass filter is controlled by the magnitude of the delta coefficients in certain low frequency bins.
 4. The apparatus of claim 1 wherein the circuit to set a configurable low pass filter determines the minimum number of high frequency coefficients to mask out to achieve a target compression size.
 5. A method for transforming JPEG codec compatible files by a processor communicatively coupled to at least one event capture terminal and coupled to a non-transitory computer-executable instruction store, the method comprising: reading a first target compression ratio store; receiving a first JPEG codec compatible image file; determining a post-compression target file size; receiving a second JPEG codec compatible image file (Jframe); decoding frequency bin coefficients for each pixel block of the first Jframe and of the second Jframe by reverse Huffman encoding; determining an integer value to configure a low pass filter mask; determining a difference between each pair of respective coefficients of a pixel block in the first Jframe and its corresponding pixel block in the second Jframe; determining when the difference between each pair of respective coefficients of the low pass filter masked frequency bins is less than a threshold; and on the condition that the differences for all masked bits are below the threshold; forcing the difference values of masked frequency bins to zero.
 6. The method of claim 5 wherein the process of determining an integer value to configure a low pass filter mask comprises: reading an integer value for a fixed minimum Low Pass Filter (minLPF) mask representing a limit to a number of high frequency bins which may be set to zero; reading the post-compression target file size; determining the smallest integer value integer which successfully achieves the post-compression target file size; storing the lesser of minLPF or the smallest integer value which successfully achieves the post-compression target file size as the integer value to configure a low pass filter mask.
 7. The method of claim 5 further comprising: determining that a 1st JPEG codec compatible image file (Jframe) is a key frame by one of periodically or upon conditions in the content or external events, selecting a Jframe from among the plurality of image files by one of an external event, image content, periodicity in time or count, and data stored.
 8. The method of claim 5 further comprising: storing metadata to identify the relationship and location of key frames and subsequent frames.
 9. The method of claim 5 further comprising writing meta data into file headers for Kframes and subframes to identify their relationship.
 10. The method of claim 5 further comprising: Huffman encoding the difference values of all pixel blocks of the second Jframe to provide a JPEG compatible subsequent frame file.
 11. The method of claim 5 for transforming JPEG codec compatible files by a processor communicatively coupled to at least one event capture terminal and coupled to a non-transitory computer-executable instruction store, the method further comprising: reading a first target compression ratio store; receiving a first JPEG codec compatible image file; determining a post-compression target file size; receiving a second JPEG codec compatible image file (Jframe); decoding frequency bin coefficients for each pixel block of the first Jframe and of the second Jframe by reverse Huffman encoding; selecting the first Jframe as a key frame (Kframe) and the second Jframe as a subsequent frame (subframe); differencing coefficients of a key frame and a subsequent frame; re-encoding the difference in coefficients as a JPEG compatible subsequent frame; determining when the resultant subsequent frame meets the required target size; and on the condition that the resultant subsequent frame meets the required target size, storing the file and annotating the meta data with the relationship of the subsequent file to the key file; or on the condition that the resultant subsequent frame fails to meet the required target size, discarding it and designating the second Jframe as a second key frame.
 12. The method of claim 11 further comprising: determining the absolute magnitude of the difference between the coefficients of certain low frequency bins of the key frame and the subsequent frame; summing the absolute magnitude of the differences between the coefficients of certain low frequency bins; on the condition when the sum of the absolute magnitude of the coefficients of certain low frequency bins exceeds a threshold, enabling all of the differences between coefficients in all of the frequency bins to be available for re-encoding into a JPEG compatible file.
 13. The method of claim 11 further comprising: determining the absolute magnitude of the difference between the coefficients of certain low frequency bins of the key frame and the subsequent frame; summing the absolute magnitude of the differences between the coefficients of certain low frequency bins; on the condition when the sum of the absolute magnitude of the coefficients of certain low frequency bins is below a threshold, enabling only the coefficients of the low pass filter mask frequency bins for re-encoding into a JPEG compatible file.
 14. The method of claim 11 further comprising: reading an integer value for a fixed minimum Low Pass Filter (minLPF) mask representing a limit to a number of high frequency bins which may be set to zero; reading the post-compression target file size; determining the smallest integer value integer which successfully achieves the post-compression target file size; storing the lesser of minLPF or the smallest integer value which successfully achieves the post-compression target file size as the integer value to configure a low pass filter mask; and designating the non-masked bits of the low pass filter as indicators of certain low frequency bins.
 15. The method of claim 11 for compression of a plurality of JPEG codec compatible files (Jframe) in time, spatial, and frequency domains further comprising: reversing Huffman encoding of a first Jframe and storing every frequency coefficient of every block of pixels in to a computer-readable store as a first key frame (Kframe); reversing Huffman encoding of an other Jframe to obtain every frequency coefficient of every block of pixels; transforming the other Jframe into a subsequent frame (subframe) by determining delta frequency coefficients for each block of pixels in the subframe; storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; when the resulting file size meets the target compression goal, storing the file as a subsequent file and storing meta data relating the subsequent file to its related key file, and when the resulting file size exceeds the target compression goal, discarding the delta coefficients and storing the original frequency coefficients of all the blocks as a new key file.
 16. A method for compression of a plurality of JPEG codec compatible files (Jframe) in time, spatial, and frequency domains comprising: reversing Huffman encoding of a first Jframe and storing every frequency coefficient of every block of pixels in to a computer-readable store as a first key frame (Kframe); reversing Huffman encoding of an other Jframe to obtain every frequency coefficient of every block of pixels; transforming the other Jframe into a subsequent frame (subframe) by determining delta frequency coefficients for each block of pixels in the subframe; applying a motion trigger rule to the delta frequency coefficients of each block of pixels separately; on determining a condition that the motion trigger rule passes for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the motion trigger rule fails for each block of pixels, storing zeros for all the delta frequency coefficients of each block; when the resulting file size meets the target compression goal, storing the file as a subsequent file and storing meta data relating the subsequent file to its related key file, and when the resulting file size exceeds the target compression goal, discarding the delta coefficients and storing the original frequency coefficients of all the blocks as a new key frame.
 17. The method of claim 16 performed by a processor coupled to non-transitory computer readable storage further comprising: applying a noise trigger rule to the delta frequency coefficients of each block of pixel separately; on determining a condition that the noise trigger rule fails for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the noise trigger rule passes for each block of pixels, applying a High Frequency Coefficient (HFC) mask which zeros the H highest frequency delta coefficients of each block, and Huffman encoding the HFC masked delta frequency coefficients; and, determining a file size of a file which contains all the Huffman encoded delta frequency coefficients which have been HFC masked or not masked.
 18. The method of claim 16 performed by a processor coupled to non-transitory computer readable storage further comprising: applying a least significant bit (LSB) trigger rule to the delta frequency coefficients of each block of pixel separately; on determining a condition that the LSB trigger rule fails for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the LSB trigger rule passes for each block of pixels, applying an LSB mask which zeros the L least significant bits of the delta coefficients of each block, and Huffman encoding the LSB masked delta frequency coefficients; and, determining a file size of a file which contains all the Huffman encoded delta frequency coefficients which have been LSB masked or not masked.
 19. The method of claim 16 performed by a processor coupled to non-transitory computer readable storage further comprising: configuring a low pass filter; applying a configured low pass filter trigger (CLPF) rule to the delta frequency coefficients of each block of pixels separately; on determining a condition that the CLPF trigger rule fails for each block of pixels, storing all of the delta frequency coefficients of each block, and Huffman encoding the stored delta frequency coefficients of each block; on determining a condition that the CLPF trigger rule passes for each block of pixels, applying the configured low pass filter to the delta frequency coefficients of each block, and Huffman encoding the filtered delta frequency coefficients; and, determining a file size of a file which contains all the Huffman encoded delta frequency coefficients which have been filtered or not filtered.
 20. The method of claim 19 performed by a processor coupled to non-transitory computer readable storage wherein configuring a low pass filter comprises: reading a target compression ratio from a non-transitory computer readable store; determining a target compressed file size by applying the target compression ratio to a first key frame; determining a number P of highest frequency bins of delta frequency coefficients which when zeroed, cause a first subsequent frame to meet the target compressed file size; and storing P as the configuration of a low pass filter until a new key frame is selected. 